//
// Copyright (C) [2024] Xingyun Integrated Circuit, Inc.
//
// GreenCode was a private technology asset of Xingyun Integrated Circuit， Inc （Confidential）
//  Author: Shawn.Tan
//  Date : 2025.10.28
//
//  History : Initial Version 2025.10.28
//

//
#ifndef Green_InitialSetupGPGPU_H
#define Green_InitialSetupGPGPU_H

#include <map>

#include "Defines.h"
#include "Enums.h"
#include ARCH_ENUM_HEADER

namespace Green {

  class Config;
  class Generator;
  class ChoiceTree;

  /*!
    \struct SystemOption
    \brief Handles system options.
  */
  struct SystemOption {
  public:
    ESystemOptionType mType; //!< System option type.
    uint32 mValue; //!< System option value.
    bool mValid; //!< System option specified.
  public:
    explicit SystemOption(ESystemOptionType sysOpType) //!< Constructor.
      : mType(sysOpType), mValue(0), mValid(false)
    {

    }

    void Process(const Config& rConfig); //!< Process the system option.
  };

  /*!
    \class InitialSetupGPGPU
    \brief Handles initial setup for GPGPU architecture.
  */
  class InitialSetupGPGPU {
  public:
    explicit InitialSetupGPGPU(Generator* pGen); //!< Constructor with pointer to Generator given.
    ~InitialSetupGPGPU(); //!< Destructor.

    ASSIGNMENT_OPERATOR_ABSENT(InitialSetupGPGPU);
    COPY_CONSTRUCTOR_ABSENT(InitialSetupGPGPU);
    void Process(); //!< Process initial setup.
  protected:
    const Config* mpConfig; //!< Pointer to Config object.
    Generator* mpGenerator; //!< Pointer to generator.
    SystemOption* mpFlatMapOption; //!< Flat Map system option
    SystemOption* mpPrivilegeLevelOption; //!< Privilege level system option
    SystemOption* mpDisablePagingOption; //!< Disable paging system option
  };

}

#endif //Green_InitialSetupGPGPU_H
